/*****************************************************
** Author: 
** Date: 2019-11-01
*
*****************************************************/

#ifndef __DNALUA_H_
#define __DNALUA_H_

#ifdef __cplusplus
extern "C"{
#endif


#include "comm.h"

enum {
	DNALUA_BASE_CLOUDS_ID = 0x00,
    DNALUA_BASE_BUS_ID = 0x100,
};

enum {
    // clodus
    PORT_ID_BL = DNALUA_BASE_CLOUDS_ID,
    PORT_ID_JD,
    PORT_ID_WX,
    PORT_ID_AL,
    PORT_ID_GW,
    PORT_ID_RESERVE1,
    PORT_ID_RESERVE2,
    PORT_ID_HI,
    PORT_ID_RESERVE3,
    PORT_ID_GL,
    PORT_ID_SN,    
    PORT_ID_GM,
    PORT_ID_TC,
	PORT_ID_AND,
	PORT_ID_RESERVE4,
	PORT_ID_RESERVE5,
	PORT_ID_FC,
    PORT_ID_RESERVE6,
    PORT_ID_LK,
	PORT_ID_BD,
	PORT_ID_RESERVE7,
	PORT_ID_AIOT,
	PORT_ID_CLOUDS_MAX,
	// bus
    PORT_ID_NONE = DNALUA_BASE_BUS_ID,
    PORT_ID_UART,
    PORT_ID_I2C,
};

enum {
    CLOUD_DEVDATA_BINARY = 0,
    CLOUD_DEVDATA_KEYVALUE,
    CLOUD_DEVDATA_PASSTHROUGH,
};

enum {
    CLOUD_PERIOD_UPLOAD = 0,
    CLOUD_TRIGGER_UPLOAD,
    CLOUD_ACTIVE_UPLOAD,
};

int luaopen_dnalua(lua_State *l);
int luaclose_dnalua(lua_State *l);


#ifdef __cplusplus
}
#endif

#endif /* __DNALUA_H_ */

